#include<stdio.h>
int main()
{
    int m,n,i,s1=0,s2=0;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d",&m);
        if(m%2==0)
            s1++;
        else
            s2++;
    }
    printf("%d %d",s2,s1);
    return 0;
}